package string;

/**
 * String
 */
public class SubStringDemo {
    public static void main(String[] args) {
        String line = "www.tedu.cn";

        String sub = line.substring(4,8);
        System.out.println(sub);

        sub = line.substring(4);//从下标4开始截取到字符串末尾
        System.out.println(sub);
    }
}
